﻿using Heroius.Extension;
using Heroius.Extension.WPF;
using Heroius.Files;
using System.Windows;

namespace IEPI.BIATranscribe
{
    public class GridPageDef : ObservableEntity
    {
        /// <summary>
        /// 表格页边距
        /// </summary>
        [PropertyPanel(Order = -1)]
        public Thickness GridPageMargin { get { return new Thickness(GridPageMargin_Left, GridPageMargin_Top, GridPageMargin_Right, GridPageMargin_Bottom); } }
        [EntitySilo, PropertyPanel(Label = "左边距")]
        public double GridPageMargin_Left { get { return _GridPageMargin_Left; } set { _GridPageMargin_Left = value; RaisePropertyChangedEvent("GridPageMargin_Left"); RaisePropertyChangedEvent("GridPageMargin"); } }
        double _GridPageMargin_Left = 150;
        [EntitySilo, PropertyPanel(Label = "上边距")]
        public double GridPageMargin_Top { get { return _GridPageMargin_Top; } set { _GridPageMargin_Top = value; RaisePropertyChangedEvent("GridPageMargin_Top"); RaisePropertyChangedEvent("GridPageMargin"); } }
        double _GridPageMargin_Top = 500;
        [EntitySilo, PropertyPanel(Label = "右边距")]
        public double GridPageMargin_Right { get { return _GridPageMargin_Right; } set { _GridPageMargin_Right = value; RaisePropertyChangedEvent("GridPageMargin_Right"); RaisePropertyChangedEvent("GridPageMargin"); } }
        double _GridPageMargin_Right = 150;
        [EntitySilo, PropertyPanel(Label = "下边距", Order = -1)]
        public double GridPageMargin_Bottom { get { return _GridPageMargin_Bottom; } set { _GridPageMargin_Bottom = value; RaisePropertyChangedEvent("GridPageMargin_Bottom"); RaisePropertyChangedEvent("GridPageMargin"); } }
        double _GridPageMargin_Bottom = 0;


        [EntitySilo, PropertyPanel(Label = "行数")]
        public int RowCount { get { return _RowCount; } set { _RowCount = value; RaisePropertyChangedEvent("RowCount"); } }
        int _RowCount;
        [EntitySilo, PropertyPanel(Label = "列数")]
        public int ColumnCount { get { return _ColumnCount; } set { _ColumnCount = value; RaisePropertyChangedEvent("ColumnCount"); } }
        int _ColumnCount;
        [EntitySilo, PropertyPanel(Label = "行高")]
        public double RowHeight { get { return _RowHeight; } set { _RowHeight = value; RaisePropertyChangedEvent("RowHeight"); } }
        double _RowHeight;
        [EntitySilo, PropertyPanel(Label = "列宽")]
        public string ColumnWidths { get { return _ColumnWidths; } set { _ColumnWidths = value; RaisePropertyChangedEvent("ColumnWidths"); } }
        string _ColumnWidths = "1";
    }
}
